﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<form id="pagerForm" method="post" action="<%=basePath%>operat_findChannel.action"> <!-- 此action指定的是排序、分页所提交的action -->
	<input type="hidden" name="status" value="${param.status}">
	<input type="hidden" name="keywords" value="${param.keywords}" />
	<input type="hidden" name="pageNum" value="${requestScope.pageNum}" />
	<input type="hidden" name="numPerPage" value="${model.numPerPage}" />
	<input type="hidden" name="orderField" value="${param.orderField}" />
	<input type="hidden" name="orderDirection" value="${param.orderDirection}" />
</form>


<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="<%=basePath%>operat_findChannel.action?numPerPage=10&pageNum=1&orderField=P_CHANNEL_NUMBER&orderDirection=asc" method="post">
	<div class="searchBar">
				<div class="pageFormContent1">
					<p>
					<label width="50">渠道名称：</label>
					<input type="text" name="simpleBean.channelName" />
					</p>
					<p>
					<label>渠道别名：</label>
					<input type="text" name="simpleBean.channelAliAs" />
					</p>
					<p>
				    <label>渠道类别：</label>
					<select name="simpleBean.typeName" class=" combox">
					<option value="" selected>全部</option>
					<c:forEach items="${sessionScope.channelClasses}" var="chanClass">
						<option value="${chanClass.PClassName }">${chanClass.PClassName }</option>
					</c:forEach>
					</select>
					</p>
					<p>
					<label>物流模式：</label>
					<select name="simpleBean.channelMode" class=" combox">
					<option value="" selected>全部</option>
					<option value="国际小包">国际小包</option>
					<option value="国际快递">国际快递</option>
					<option value="国内物流">国内物流</option>
					<option value="空海运">空海运</option>
					<option value="仓储">仓储</option>
					</select>
					</p>
					<p>
					<label>适用类别：</label>
					<select name="simpleBean.channelClass" class=" combox">
					<option value="" selected>全部</option>
					<option value="1">出货</option>
					<option value="2">收货</option>
					<option value="3">出/收货</option>
					</select>
					</p>
					<p>
					<label>状态：</label>
					<select name="simpleBean.status" class=" combox">
					<option value="" selected>全部</option>
					<option value="CL">停用</option>
					<option value="NE">启用</option>
					</select>
					</p>
				</div>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">&nbsp;&nbsp;&nbsp;查&nbsp;&nbsp;询&nbsp;&nbsp;&nbsp;</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<%=basePath%>operat_getOperat_add.action?aChannel_number={channel_number}" rel="AddOperate" target="navTab" title="添加操作要求"
			rel="AddOperate"><span>添加操作要求</span></a></li>
			<li><a target="navTab" title="" class="delete" 
			href="<%=basePath%>operat_getOperat_del.action?dChannel_number={channel_number}" rel="DeleteOperate"><span>删除操作要求</span></a></li>
			<li><a title=""  class="edit"
			href="<%=basePath%>operat_getOperat_edit.action?eChannel_Number={channel_number}" target="navTab" rel="EditOperate"><span>修改操作要求</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="demo/common/dwz-team.xls" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="194">
		<thead>
			<tr>
				<th width="30"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="120" orderField="P_CHANNEL_NAME" class="${requestScope.orderDirection }">渠道名称</th>
				<th width="150" orderField="P_CHANNEL_ALIAS" class="${requestScope.orderDirection }">渠道别名</th>
				<th width="100" orderField="P_CLASS_NUMBER" class="${requestScope.orderDirection }">渠道类别</th>
				<th width="150" orderField="P_CHANNEL_MODE" class="${requestScope.orderDirection }">物流模式</th>
				<th width="80" orderField="P_CHANNEL_CLASS" class="${requestScope.orderDirection }">适用类别</th>
				<th width="80" orderField="P_CHANNEL_S_PARTITION" class="${requestScope.orderDirection }">起始分区数</th>
				<th width="80" orderField="P_CHANNEL_E_PARTITION" class="${requestScope.orderDirection }">目的分区数</th>
				<th width="50" orderField="P_CHANNEL_STATUS" class="${requestScope.orderDirection }">状态</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${requestScope.channelList}" var="channel" varStatus="varStatus">
			<tr target="channel_number" rel="${channel.channelNumber}">
				<td><input name="ids" value="xxx" type="checkbox"></td>
				<td>${channel.channelName}</td>
				<td>${channel.channelAliAs}</td>
				<td>${channel.typeName}</td>
				<td>
				<c:if test="${channel.channelMode eq 'PT'}">
					国际小包
				</c:if>
				<c:if test="${channel.channelMode eq 'IE'}">
					国际快递
				</c:if>
				<c:if test="${channel.channelMode eq 'DC'}">
					国内快递
				</c:if>
				<c:if test="${channel.channelMode eq 'AT'}">
					空运
				</c:if>
				<c:if test="${channel.channelMode eq 'SG'}">
					海运
				</c:if>
				<c:if test="${channel.channelMode eq 'WG'}">
					仓储
				</c:if>
				</td>
				<td>
					<c:if test="${channel.channelClass eq '1'}">
					出货
				</c:if>
				<c:if test="${channel.channelClass eq '2'}">
					收货
				</c:if>
				</td>
				<td>${channel.startCount}</td>
				<td>${channel.endCount}</td>
				<c:if test="${channel.status eq 'NE'}">
					<td>启用</td>
				</c:if>
				<c:if test="${channel.status eq 'CL'}">
					<td>停用</td>
				</c:if>
			</tr>
		</c:forEach>

		</tbody>
	</table>
	<div class="panelBar" >
		<div class="pages">
			<span>显示</span>
			<select id="countSelect" class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})"  >
				<option value="10">10</option>
				<option value="50">50</option>	
				<option value="100">100</option>
			</select>
			<span>条，共${requestScope.totalRecords}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="${requestScope.totalRecords}" numPerPage="${requestScope.pageSize}" pageNumShown="${requestScope.totalPages}" currentPage="${requestScope.pageNum }"></div>

	</div>
</div>
<script type="text/javascript">
	(function () {
		var a = document.getElementById("countSelect");
		switch(${requestScope.numPerPage}){
			case 10:
				a.options.selectedIndex = 0;
				break;
			case 50:
				a.options.selectedIndex = 1;
				break;
			case 100:
				a.options.selectedIndex = 2;
				break;
		}
	})();
</script>
